using System;

using DesignByContract;

namespace Outcoding.GraphGenerator.Entities {
    public class Slide {
        
        private SlideLayout mLayout;

        private ShapeCollection mShapes;

        private int mIndex;

        public SlideLayout Layout {
            get {
                return mLayout;
            }
            set {
                mLayout = value;
            }
        }

        public ShapeCollection Shapes {
            get {
                if (mShapes == null)
                    mShapes = new ShapeCollection();
                return mShapes;
            }
            set {
                mShapes = value;
            }
        }

        public int Index {
            get{
                return mIndex;
            }
            set{
                Check.Ensure(value > 0, "Index value cannot be less than zero.", new ArgumentOutOfRangeException());
                mIndex = value;
            }
        }
    }
}
